import Layout from '@/layout'
import SettingEnv from '@/setting.env'

const agent = 'agent_'

export default {
  path: `${ SettingEnv.customRouter }/agent`,
  name: 'order',
  component: Layout,
  alwaysShow: true,
  redirect: `${ SettingEnv.customRouter }/agent/list`,
  meta: {
    title: '分销',
    icon: 'agent'
  },
  children: [
    {
      path: 'spread',
      name: `${ agent }spread`,
      component: () => import('@/views/agent/spread/index'),
      meta: {
        title: '分销设置'
      }
    },
    {
      path: 'agent_list',
      name: `${ agent }agent_list`,
      meta: {
        title: '分销员管理'
      },
      component: () => import('@/views/agent/agent_list/index')
    },
    {
      path: 'roles',
      name: `${ agent }roles`,
      meta: {
        title: '分销角色'
      },
      component: () => import('@/views/agent/roles')
    }
  ]
}
